package io.github.talelin.latticy.model;

import io.github.talelin.latticy.dto.rule.ruleValue.RuleValueDTO;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

/**
 * @author generator@wulongbo
 * @since 2022-08-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("rule_value")
@NoArgsConstructor
@AllArgsConstructor
public class RuleValueDO extends BaseModel {


    /**
     * 规则key id
     */
    private Integer ruleKeyId;

    /**
     * 下拉框值
     */
    private String value;

    public RuleValueDO(RuleValueDTO dto) {
        BeanUtils.copyProperties(dto, this);
    }

    public RuleValueDO(RuleValueDTO dto,Integer id) {
        BeanUtils.copyProperties(dto, this);
        this.setId(id);
    }

}
